<?php
class entity{
	
	var $id;
	var $display;
	var $table;
	var $params;
	
	function __construct($id, $display){
		$this->id = $id;
		$this->display = $display;
	}
	
	function get_access_string(){
		$str = "";
		if($this->params){
			foreach($this->params as $param){
				if($param->get_primary() == "true"){
					if(strlen($str) > 0){ $str .= "&"; }
					$str .= $param->get_field()."=".$param->get_value();
				}
			}
		}
		
		return $str;
	}
	
	function get_id(){
		return $this->id;
	}
	
	function get_display(){
		return $this->display;
	}
	
	function get_table(){
		return $this->table;
	}
	
	function get_params(){
		return $this->params;
	}
	
	function set_id($id){
		$this->id = $id;
	}
	
	function set_display($display){
		$this->display = $display;
	}
	
	function set_table($table){
		$this->table = $table;
	}
	
	function set_params($params){
		$this->params = $params;
	}
	
}
?>